package cnpm.service.impl;

import java.util.List;

import cnpm.dao.ContractDAO;
import cnpm.dao.impl.ContractDAOImpl;
import cnpm.entity.Contract;
import cnpm.entity.Employee;
import cnpm.service.ContractService;

public class ContractServiceImpl implements ContractService {

	private ContractDAO cDAO;
	
	public ContractServiceImpl() {
		cDAO = new ContractDAOImpl();
	}
	@Override
	public boolean saveOrUpdateContract(Contract c) {
		return cDAO.saveOrUpdateContract(c);
	}

	@Override
	public boolean deleteContract(Contract c) {
		return cDAO.deleteContract(c);
	}

	@Override
	public List<Contract> getAllContract(Employee e) {
		return cDAO.getAllContract(e);
	}

	@Override
	public Contract getContractByID(String contractID) {
		return cDAO.getContractByID(contractID);
	}
}
